package spittr.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

import spittr.web.WebConfig;

/**
 * @author Administrator
 * 配置DispatcherServlet
 *
 */
public class SpitterWebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
  
  /* (non-Javadoc)
 * 指定ContextLoaderListener加载类
 */
@Override 
  protected Class<?>[] getRootConfigClasses() {
    return new Class<?>[] { RootConfig.class };
  }

  /* (non-Javadoc)
 * 指定配置类
 */
@Override 
  protected Class<?>[] getServletConfigClasses() {
    return new Class<?>[] { WebConfig.class };
  }

  /* (non-Javadoc)
   * 将DispatcherServlet映射到"/"
 */
@Override
  protected String[] getServletMappings() {
    return new String[] { "/" };
  }

}